package com.zxkj.domain.entity;

import javax.persistence.Column;
import javax.persistence.Embeddable;
import java.io.Serializable;

@Embeddable
public class SciMapAuCorpAuPK implements Serializable {
    public SciMapAuCorpAuPK() {
    }

    public SciMapAuCorpAuPK(String sciAuId, String corpAuId) {
        this.sciAuId = sciAuId;
        this.corpAuId = corpAuId;
    }

    private static final long serialVersionUID = -2432145316543676L;
    @Column(nullable = false)
    private String sciAuId;
    @Column(nullable = false)
    private String corpAuId;


    public String getSciAuId() {
        return sciAuId;
    }

    public void setSciAuId(String sciAuId) {
        this.sciAuId = sciAuId;
    }

    public String getCorpAuId() {
        return corpAuId;
    }

    public void setCorpAuId(String corpAuId) {
        this.corpAuId = corpAuId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        SciMapAuCorpAuPK that = (SciMapAuCorpAuPK) o;

        if (sciAuId != null ? !sciAuId.equals(that.sciAuId) : that.sciAuId != null) return false;
        return corpAuId != null ? corpAuId.equals(that.corpAuId) : that.corpAuId == null;
    }

    @Override
    public int hashCode() {
        int result = sciAuId != null ? sciAuId.hashCode() : 0;
        result = 31 * result + (corpAuId != null ? corpAuId.hashCode() : 0);
        return result;
    }




}
